<div id="cc" class="easyui-layout" style="width:100%;height:100%;">
	<div data-options="region:'west',split:false" style="width:200px;">
		<ul id="qudao_tree"></ul>
	</div>
	<div data-options="region:'center'" style="padding:5px;background:#eee;">
		<div id="content_tabs" class="easyui-tabs" fit="true" border="false">
		</div>
	</div>
</div>
<#include "/WEB-INF/views/include/common.ftl"/>
<script type="text/javascript" src="${ctxStatic}/js/tab.js"></script>
<script type="text/javascript">
	var qudao_tree = $('#qudao_tree');
	$(function() {
		qudao_tree.tree({
			method: 'get',
			lines : true,
			url: '${ctx}/offer/payTypeList',
		});

		$("#zfgs a").click(function() {
			var title = $(this).text();
			var url = $(this).attr("href");
			var icon = $(this).attr("icon");
			OpenInnerTab(title, url, icon);
			return false; //使超链接的单击事件失效
		});

		qudao_tree.tree({
            onClick : function(node) {
				if (node.attributes.type == 'company') { //选择的是支付公司时候
				    var url_type_1 = "${ctx}/offer/companyChannelListUI/"+node.id;//根据id 拼接url 查询支付公司资料
					OpenInnerTab(node.text,url_type_1,null)
				}else{//支付方式查询
					var url_type_2 = "${ctx}/offer/payChannelListUI/"+node.id;
					var parentNode =  qudao_tree.tree("getParent",node.target);
					var text = parentNode.text + "-" + node.text;
					OpenInnerTab(text,url_type_2,null);
				}
				return false;
			}
		});
	});
</script>